
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>二号红人</title>
  	<link rel="stylesheet" href="https://img.xyxsc.com/front/kuaishu/css/common.css?t=308400">
	<link rel="stylesheet" href="https://img.xyxsc.com/front/kuaishu/css/nan.css?t=308400">
	<link rel="stylesheet" href="https://img.xyxsc.com/front/kuaishu/css/index.css?t=308400">
	<link rel="stylesheet" href="https://img.xyxsc.com/front/kuaishu/css/book.css?t=308400">
	<link rel="stylesheet" href="../css/yuedu.css?t=308400">
	<link rel="stylesheet" href="https://img.xyxsc.com/front/kuaishu/css/xiajia.css?t=308400">
	<link rel="stylesheet" href="https://img.xyxsc.com/front/kuaishu/css/remind.css?t=308400">
  	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  	<meta name="format-detection" content="telephone=no" />
  	<style>
  		.hui-list-text{
  			height: 30px;
  			margin-left: 10px;
  		}
  	</style>
</head>
<body class="">
		<div class="sc-mulu">
		<i></i>&gt<a onClick="book();" id="bname"></a> &gt <a href="mulu.html">章节目录</a>
	</div>
	<div class="sc-yuedu">
		<div class="yd-left">
			<h3 id="names"></h3>
			<p id="time"></p>
		</div>
		<div class="yd-right">
			<a onclick="up();">上一章</a>
			<a onclick="next();">下一章</a>
			<div>
				<span class="yejian_btn">夜</span>
				<span class="bigger">+A</span>
				<span class="smaller">-A</span>
			</div>
		</div>
	</div>
	<div class="yd-text" style="font-size:16px;color: #717171">
	</div>
		<div class="page">
		<a class="page-up" onclick="up();">上一章</a>
		<a href="mulu.html" class="page-main">返回目录</a>
		<a class="page-down" onclick="next();">下一章</a>
	</div>
	<div class="two-code">
  		<a href="https://zj.xyxsc.com/index/appdown">
			<img src="https://img.xyxsc.com/front/m/images/appdown_small1.png" alt="" style="width: 100%">
		</a>
	</div>
	<div class="qiehuan-list"> 
		<div class="xihuan container">
			<h3>这些也很有趣哦</h3>
		</div>
		<div id="yq">
			
		</div>
	</div>
	<div class="remind" style="display: none">
	    <p>亲爱的读者：夜已深，请打开夜间阅读模式保护您的双眼。</p>
	    <span></span>
	</div>
	<!-- 客服信息开始 -->
	<div class="nav-bottom bottom-bg">
		<ul>
	    	<li><a href="../main.html">首页</a></li>
	    	<li><a href="paihang.html">排行榜</a></li>
	    	<li><a href="wanben.html">完本</a></li>
	    	<li><a href="shuku.html">书库</a></li>
	    	<li><a href="/user/bookshelf">书架</a></li>
		</ul>
	</div>
	<div style="margin-top:22px;">
		<ul class="">
			<li>
				<a href="tel://18370940755">
		    		<div class="hui-list-text">在线联系电话：18370940755</div>
		    	</a>
			</li>
			<li>
				<a href="jjavascript:void(0);">
		    		<div class="hui-list-text">在线客服QQ：275300091</div>
		    	</a>
			</li>
			<li>
				<a href="javascript:void(0);">
		    		<div class="hui-list-text">问题反馈邮箱：275300091@qq.com</div>
		    	</a>
			</li>
		</ul>
		<p style="height: 40px;text-align: center;margin-top: 10px;">鄂ICP备16023444号</p>
		<input type="hidden" id="sid" />
	</div>
  </body>
<script type="text/javascript" src="../js/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../js/hui.js" charset="UTF-8"></script>
<script>
	var sectionid = localStorage.getItem("section_id");
	var bookId = localStorage.getItem("bookid");
	hui.getJSON(
	    rootpath+'/booksSection/findBooksSectionSection/'+sectionid,
	    function(msg){
	    	console.log(msg);
	    	$(".yd-text").html(msg.content);
	    	$("#names").html(msg.name+"&nbsp;&nbsp;"+msg.title);
	    	$("#time").html(getDate(msg.publishTime)+"更新");
	    	$("#bname").html(msg.booksVo.name);
	    	$("#sid").val(msg.id);
	    },
	    function(e){
	        hui.iconToast('读取消息失败', 'warn');
	        console.log(e);
	    }
	);
	var five = '<a onclick="bookInfo(~);">';
	five = five +'<div class="book-two container "  >';
	five = five +'<div class="two-title">';
	five = five +'<b>~</b>';
	five = five +'</div>';
	five = five +'<p>~</p>';
	five = five +'<span class="banner-c zhuidu">~</span> ';
	five = five +'</div>';
	five = five +'</a>';
	hui.getJSON(
	    rootpath+'/books/getFiveBooks',
	    function(msg){
	    	var all = "";
	    	for(var i=0;i<msg.length;i++){
	    		var dd=msg[i].introduction.replace(/<\/?.+?>/g,"");
				var dds=dd.replace(/ /g,"");//dds为得到后的内容
				var ins = dds.substring(0,40)+"...";
				all = all + five.replace("~",msg[i].id).replace("~","["+msg[i].bookTypeName+"]&nbsp;&nbsp;"+msg[i].name).replace("~",ins).replace("~","追读："+msg[i].readCount+"人");		
	    	}
	    	$("#yq").html(all);
	    },
	    function(e){
	        hui.iconToast('读取消息失败', 'warn');
	        console.log(e);
	    }
	);
	$(".yejian_btn").click(function(){
		var bodyName = document.body.className;
		if(!bodyName){
			document.body.className="yejian_body";
		}else{
			document.body.className="";
		}
	});
	$(".bigger").click(function(){
	    var ydSrcfont = $(".yd-text").css("font-size");
	    var fonts = ydSrcfont.slice(0,2); //获取单位
	    var font = parseInt(fonts);
	    if(font<20){
	    	font = parseInt(font)+2;
	    	$(".yd-text").css("font-size",font);
	    }else{
	    	$(".yd-text").css("font-size",20);
	    }
	});
	$(".smaller").click(function(){
	    var ydSrcfont = $(".yd-text").css("font-size");
	    var fonts = ydSrcfont.slice(0,2); //获取单位
	    var font = parseInt(fonts);
	    if(font>10){
	    	font = parseInt(font)-2;
	    	$(".yd-text").css("font-size",font);
	    }else{
	    	$(".yd-text").css("font-size",10);
	    }
	});
	function next(){
		hui.postJSON(
		    rootpath+'/booksSection/downList',
		    {
		    	bookId:bookId,
		    	sectionId:parseInt($("#sid").val())
		    },
		    function(msg){
		    	$(".yd-text").html(msg.content);
		    	$("#names").html(msg.name+"&nbsp;&nbsp;"+msg.title);
		    	$("#time").html(getDate(msg.publishTime)+"更新");
		    	$("#bname").html(msg.booksVo.name);
		    	$("#sid").val(msg.id);
		    },
		    function(e){
		        hui.iconToast('读取消息失败', 'warn');
		        console.log(e);
		    }
		);
		scroll(0,0);
	}
	function up(){
		hui.postJSON(
		    rootpath+'/booksSection/upList',
		    {
		    	bookId:bookId,
		    	sectionId:parseInt($("#sid").val())
		    },
		    function(msg){
		    	$(".yd-text").html(msg.content);
		    	$("#names").html(msg.name+"&nbsp;&nbsp;"+msg.title);
		    	$("#time").html(getDate(msg.publishTime)+"更新");
		    	$("#bname").html(msg.booksVo.name);
		    	$("#sid").val(msg.id);
		    },
		    function(e){
		        hui.iconToast('读取消息失败', 'warn');
		        console.log(e);
		    }
		);
		scroll(0,0);
	}
	function book(){
		location.href="bookInfo.html";
	}
	function bookInfo(id){
		localStorage.removeItem("bookid");
		localStorage.setItem("bookid",id);
		location.href="bookInfo.html";
	}
</script>
</html>
